libxl: refactor toolstack save restore code
authorWei Liu <wei.liu2@citrix.com>
Wed, 17 Jun 2015 11:08:38 +0000 (12:08 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 17 Jun 2015 13:11:25 +0000 (14:11 +0100)
commitc6ef839d84726cf420a0381174f0f8ffac6ffd84
tree63d17726fe6e0f5e380e6bc1ef152071d7be1d66
parentd45e9b7c53428a2aa4d067927e7ef5e30783fb8b
libxl: refactor toolstack save restore code

This patch does following things:
1. Document v1 format.
2. Factor out function to handle QEMU restore data and function to
   handle v1 blob for restore path.
3. Refactor save function to generate different blobs in the order
   specified in format specification.
4. Change functions to use "goto out" idiom.

No functional changes introduced.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl_dom.c